<template>
	<view class="commit">
		<view class="commit-list">
				<view class="commit-item" v-for="(item,index) in list" :key="index">
					<view class="user">
						<image src="" mode=""></image>
						<view class="">
							<text class="nickName">1884138532</text>
							<text class="time">2024.05.01</text>
						</view>
					</view>
					<view class="content">
						
						<view class="commit-start">
								<text>满意度</text>
								<image :src="item>=3 ? '/static/start.png' : '/static/start-act.png'" v-for="item in 5" :key="index" mode=""></image>
								<text style="color: #FE9B23;margin-left: 10rpx;">5分</text>
						</view>
						<text class="commit-content">{{item.content}}
						</text>
					</view>
					<view class="pics">
						<image src="" v-for="(item,index) in 3" :key="index" mode=""></image>
					</view>
				</view>
			</view>
		
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import {
		evaluateAll
	}from '@/api'
	import {
		wxOpenid
	} from '@/utils/login-sdk.js'
	import {
		onLoad,
		onReachBottom,
		onShow,
	} from '@dcloudio/uni-app'
	const list = ref([])
	onLoad(async (params)=>{
		const { memberId } = await wxOpenid()
		const res = await evaluateAll({memberId,storeId:params.storeId||1})
		list.value = res.result
	})
</script>

<style lang="scss">
	page {
		background: #F8F5F0;
		padding-bottom: constant(safe-area-inset-bottom); /*兼容 IOS<11.2*/
		padding-bottom: env(safe-area-inset-bottom); /*兼容 IOS>11.2*/
	}
	.commit {
		
		.commit-list {
			margin-top: 30rpx;
	
			.commit-item {
				width: 622rpx;
				padding: 40rpx;
				background: #FFFFFF;
				border-radius: 36rpx;
				margin: 16rpx auto;
				margin-bottom: 17rpx;
				.user {
					display: flex;
					align-items: center;
					margin-bottom: 35rpx;
	
					image {
						display: block;
						width: 76rpx;
						height: 76rpx;
						border-radius: 50%;
						background: pink;
						margin-right: 14rpx;
					}
	
					view {
						flex:2;
						display: flex;
						justify-content: space-between;
						align-items: center;
						.nickName {
							font-size: 30rpx;
							color: #16191B;
							display: block;
							margin-top: 16rpx;
						}
	
						.time {
							font-size: 22rpx;
							color: #A5A5A5;
							display: block;
						}
					}
				}
	
				.content {
					.commit-start{
						
						display: flex;
						align-items: center;
						
						margin-top: 12rpx;
						margin-bottom: 12rpx;
						image{
							display: block;
							width: 22rpx;
							height: 22rpx;
							
						}
						text{
							font-size: 26rpx;
							color: #424446;
							margin-right: 10rpx;
						}
					}
					
	
					.commit-content {
						font-size: 30rpx;
						color: rgba(66, 68, 70, 1);
	
					}
				}
	
				.pics {
					margin-top: 30rpx;
					display: flex;
					flex-wrap: wrap;
					margin-right: -20rpx;
	
					image {
						width: 202rpx;
						height: 202rpx;
						display: block;
						margin-right: 10rpx;
						background: pink;
					}
				}
			}
		}
	}

</style>
